package homework;

import bean.StudentBean;

import java.util.ArrayList;
import java.util.List;

public class Test {
    public static void main(String args[]){
        List<StudentBean> list = new ArrayList<>();
        list.add(new StudentBean(1,"王钢蛋","男","成都市",90));
        list.add(new StudentBean(2,"李菊花","女","德阳市",80));
        list.add(new StudentBean(3,"李牡丹","男","自贡市",65));
        list.add(new StudentBean(4,"张小菊","女","成都市",57));
        list.add(new StudentBean(5,"李催化","女","绵阳市",9));
        list.add(new StudentBean(6,"王二狗","男","自贡市",70));
        list.add(new StudentBean(7,"李三","男","成都市",67));
        list.add(new StudentBean(8,"赵晓流","女","成都市",77));
        list.add(new StudentBean(9,"李德华","男","成都市",82));
        list.add(new StudentBean(10,"王豆花","男","成都市",20));

        list.stream().filter(s->s.getName().substring(0,1).equals("李") && s.getGender().equals("男")
            && s.getAddress().equals("成都市") && s.getScore() >= 60 && s.getScore() <= 70
        ).forEach(System.out::println);

    }
    //找出姓李的性别为男，并且家住成都市，分数在60到70的同学有哪些
    //作业要求  stream（自己看） + lambda 解决
}
